package com.cloudfun.campusshare.common.model.vo;

import com.cloudfun.campusshare.common.constant.BaseConstant;
import com.cloudfun.campusshare.util.EnumInteger;
import com.cloudfun.campusshare.util.EnumString;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 波轮洗衣机操作VO
 * Created by Huqin on 2019/12/11
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "波轮洗衣机操作信息")
public class PulseWasherOperateVO {

    @ApiModelProperty(value = "设备识别码")
    @NotEmpty(message = "设备识别码不能为空")
    @Length(max = 40, message = "设备识别码过长，限制40个字")
    @JsonProperty("deviceId")
    private String imei;

    @ApiModelProperty(value = "设备类型")
    @NotEmpty(message = "设备类型不能为空")
    @EnumString(values = {BaseConstant.BXY6_5_NAME, BaseConstant.BXYD6_5_NAME}, message = "设备类型错误")
    private String deviceType;

    @ApiModelProperty(value = "订单id")
    @NotEmpty(message = "订单id不能为空")
    @Length(max = 50, message = "订单id过长，限制50个字")
    private String orderId;

    @ApiModelProperty(value = "洗涤类型，1-5")
    @NotNull(message = "洗涤类型不能为空")
    @EnumInteger(values = {1, 2, 3, 4, 5}, message = "洗涤类型错误")
    private int washType;

    @ApiModelProperty(value = "脉冲个数，0、1、2、4、8")
    @EnumInteger(values = {0, 1, 2, 4, 8}, message = "脉冲个数错误")
    private int pulseNum;

    @ApiModelProperty(value = "是否消毒")
    private boolean disinfection;

    @ApiModelProperty(value = "是否添加洗衣液")
    private boolean addLaundryDetergent = false;

}
